package shajie.shajun.mmhf.View.Fragment;


import android.view.View;

import org.zackratos.ultimatebar.UltimateBar;

import java.util.ArrayList;

import shajie.shajun.mmhf.Base.BaseFragment;
import shajie.shajun.mmhf.Control.QQPoint.QQBezierView;
import shajie.shajun.mmhf.R;
import shajie.shajun.mmhf.databinding.FragmentContent1Binding;

/**
 * Created by Administrator on 2017/11/3.
 */

public class Content1_Fragment extends BaseFragment<FragmentContent1Binding> implements View.OnClickListener,QQBezierView.onDragStatusListener{
    private  FragmentContent1Binding binding;
    private ArrayList<String> strings= new ArrayList<>();
    @Override
    public int setlayoutid() {
        return R.layout.fragment_content1;
    }
    @Override
    public void init(final FragmentContent1Binding bingding) {
        this.binding=bingding;
        binding.setOnclicklistener(this);

//        binding.fabLabel.setOnMenuToggleListener(new FloatingActionMenu.OnMenuToggleListener() {
//            @Override
//            public void onMenuToggle(boolean opened) {
//                if (opened){
//                    binding.fragmentContent1.setBackgroundColor(Color.parseColor("#afffffff"));
//                    binding.fragmentContent1.setVisibility(View.VISIBLE);
//                    binding.fabPaihang.setVisibility(View.VISIBLE);
//                    binding.fabSearchorder.setVisibility(View.VISIBLE);
//                    binding.fabDetail.setVisibility(View.VISIBLE);
//                    binding.fabThreetyorder.setVisibility(View.VISIBLE);
//                    bingding.fabPicture.setVisibility(View.VISIBLE);
//                    binding.fabLabel.setAlpha(1.0f);
//                }else {
//                    binding.fragmentContent1.setBackgroundColor(Color.parseColor("#00ffffff"));
//                    binding.fragmentContent1.setVisibility(View.GONE);
//                    binding.fabPaihang.setVisibility(View.GONE);
//                    binding.fabSearchorder.setVisibility(View.GONE);
//                    binding.fabDetail.setVisibility(View.GONE);
//                    binding.fabThreetyorder.setVisibility(View.GONE);
//                    bingding.fabPicture.setVisibility(View.GONE);
//                    binding.fabLabel.setAlpha(0.4f);
//                }
//            }
//        });
        strings.clear();
        final UltimateBar ultimateBar=new UltimateBar(getActivity());
        ultimateBar.setColorBar(getResources().getColor(R.color.blackgray),0);
//        Bmobdata.getxiaoshoue(new Bmobdata.Singer<Currency>() {
//            @Override
//            public void success(Currency s) {
//                strings.add(s.getOne());
//                strings.add(s.getTwo());
//                strings.add(s.getThree());
//                strings.add(s.getFoure());
//                GridAdapter gridAdapter=new GridAdapter(getContext(),strings);
//                binding.gridShop.setAdapter(gridAdapter);
//                NumAnim2.startAnim(binding.tvShopwages,Public_Data.wages);
//            }
//
//            @Override
//            public void faile(String s) {
//
//            }
//        });

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
//            case R.id.fab_paihang:
//                binding.fabLabel.close(true);
//                getFragmentManager().beginTransaction()
//                        .addToBackStack(null)					        //添加返回键返回
//                        .setCustomAnimations(R.anim.in_from_left,R.anim.in_from_right,R.anim.out_from_left,R.anim.out_from_right)
//                        .replace(R.id.container,new PaiHang_Fragment())
//                        .commit();
//            break;
//            case R.id.fab_searchorder:
//                binding.fabLabel.close(true);
//                getFragmentManager().beginTransaction()
//                        .addToBackStack(null)					        //添加返回键返回
//                        .setCustomAnimations(R.anim.in_from_left,R.anim.in_from_right,R.anim.out_from_left,R.anim.out_from_right)
//                        .replace(R.id.container,new SearchOrder_Fragment(),"SearchOrder_Fragment")
//                        .commit();
//                break;
//            case R.id.fab_threetyorder:
//                binding.fabLabel.close(true);
//                getFragmentManager().beginTransaction()
//                        .addToBackStack(null)					        //添加返回键返回
//                        .setCustomAnimations(R.anim.in_from_left,R.anim.in_from_right,R.anim.out_from_left,R.anim.out_from_right)
//                        .replace(R.id.container,new Re_30_Order_Fragment(),"Re_30_Order_Fragment")
//                        .commit();
//                break;
//            case R.id.fab_detail:
//                binding.fabLabel.close(true);
//                getFragmentManager().beginTransaction()
//                        .addToBackStack(null)					        //添加返回键返回
//                        .setCustomAnimations(R.anim.in_from_left,R.anim.in_from_right,R.anim.out_from_left,R.anim.out_from_right)
//                        .replace(R.id.container,new Product_Detail_Fragment(),"Product_Detail_Fragment")
//                        .commit();
//                break;
//            case R.id.fab_picture:
//                binding.fabLabel.close(true);
//                getFragmentManager().beginTransaction()
//                        .addToBackStack(null)					        //添加返回键返回
//                        .setCustomAnimations(R.anim.in_from_left,R.anim.in_from_right,R.anim.out_from_left,R.anim.out_from_right)
//                        .replace(R.id.container,new Picture_Fragmnt(),"Picture_Fragmnt")
//                        .commit();
//                break;
//            case R.id.fab_goodspicture:
//                binding.fabLabel.close(true);
//                SImagePicker
//                        .from(this)
//                        .maxCount(9)
//                        .rowCount(3)
//                        .showCamera(true)
//                        .pickMode(SImagePicker.MODE_IMAGE)
//                        .forResult(101);
//                break;
        }
    }
    @Override
    public void onDrag(View v) {}

    @Override
    public void onMove(View v) {}

    @Override
    public void onRestore(View v) {}

    @Override
    public void onDismiss(View v) {
    }
}
